/*
 * @Author: benchenchuang benchenchuang
 * @Date: 2023-06-03 17:45:27
 * @LastEditors: benchenchuang benchenchuang
 * @LastEditTime: 2023-08-13 20:40:21
 * @FilePath: /hmp-web/src/api/staff/labour.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

/**
 * @description 查询列表
 */
export const remoteList = params => {
    return request.get('/sys/worker/query', params);
};
/**
 * 调用百度人脸监测
 * @param {*} data
 * @returns
 */
export const checkFace = data => {
    return request.post(`/sys/uploadFile/uploadAndDetect`, data);
};
/**
 * 添加
 */
export const addInfo = data => {
    return request.post(`/sys/worker/insert`, data);
};

/**
 * 更新 除了图片以外其他信息跟新
 */
export const updateInfo = data => {
    return request.post('/sys/worker/update', data);
};

/**
 * 人脸图片更新
 * @param {*} data
 * @returns
 */
/**删除 */
export const updateFace = (id, data) => {
    return request.post(`/sys/worker/faceUpdate?id=${id}`, data);
};

/**删除 */
export const deleteInfo = data => {
    return request.post(`/sys/worker/delete`, data);
};

/**
 * 履历接口
 */
export const getResume = id => {
    return request.get(`/sys/worker/queryResume?id=${id}`);
};
/**
 * 下载劳务人员模板 GET
fileName 制定文件名

http://127.0.0.1:29990/sys/worker/downLoadFileTemplate?fileName=workers.xlsx
 */
export const remoteDownloadFileTemplate = data =>{
    return request.get(`/sys/worker/downLoadFileTemplate?fileName=workers.xlsx`,data,'blob')
}

/**
 * 导入劳务人员 POST 方法
 */
export const remoteImportWorkers = data =>{
    return request.post(`/sys/worker/importWorker`,data)
}

/**
 * 导出劳务人员  GET 
workerName 人员名称
deptId 传部门id
workStatus 状态code
workLevel : 评级code
 */
export const remoteDownloadWorkerFile = data =>{
    return request.get(`/sys/worker/exportSysWorkers`,data,'blob')
}



export default {
    remoteList
};
